package com.xuchaotong.mapstruct;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

/**
 * @author EASON.TONG
 * @create 2021/06/04
 **/
@Mapper
public interface UserConvert extends BaseConvert<UserDO, User> {

    @Mappings({
        @Mapping(source = "nickName", target = "userBaseInfo.nickName"),
        @Mapping(source = "realName", target = "userBaseInfo.realName"),
        @Mapping(source = "phone", target = "userBaseInfo.phone")
    })
    User toEnity(UserDO userDO);

    UserConvert INSTANCE = Mappers.getMapper(UserConvert.class);



}
